﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.ServiceModel;
using TestConsole.CanDienTu_WS;
using System.ServiceModel.Description;

namespace TestConsole
{
    class Program
    {
        static void Main(string[] args)
        {
            var svc = new ChannelFactory<ICanDienTu_Service>("BasicHttpBinding_ICanDienTu_Service").CreateChannel();
            try
            {
                var arr = svc.DuLieu_SelectAll();
                foreach (var item in arr)
                {
                    Console.WriteLine(item.ID + "\t" + item.IDGio + "\t" + item.KhoiLuong + "\t" + item.ThoiDiemDo);
                }
                //Console.WriteLine(arr);
            }
            catch (Exception ex)
            {
                if (ex.InnerException != null)
                {
                    Console.WriteLine(ex.InnerException.Message);
                }
                else
                {
                    Console.WriteLine(ex.Message);
                }
            }           
        }

    }
}
